<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>new map()</title>
  </head>
  <body>
    <div>
      <button id="myButton">点击我</button>
      <button onclick="handleClick()">点handleClick击</button>
    </div>

    <script src="mapMitt.js" type="text/javascript"></script>
    <script>
      const emitter = new Emitter();
      function handleClick() {
        console.log("触发");
        emitter.emit("myEvent", { key: "value" });
      }
      emitter.on("myEvent", (data) => {
        console.log(data, "on 接受事件");
      });
      document
        .getElementById("myButton")
        .addEventListener("click", handleClick);

        const map = new Map();
        console.log(map,'git remote add origin https://gitee.com/lucky_ck/consolidate-foundation.git');
    </script>
  </body>
</html>
